<div id="header">
		<div id="top">
		<div id="toptext">
			<?php 
				if(!$this->Session->check("Username"))
				{
					echo "<ul id=\"onetop\">";
					echo "<li>";
					echo $html->link('Đăng kí',array('controller'=>'users','action'=>'dangkithanhvien')); 
					echo "</li>";
					echo "<li>";
					echo "&nbsp;&nbsp;";
					echo "|";
					echo "&nbsp;&nbsp;";
					echo "</li>";
					echo "<li>";
					echo $html->link('Đăng nhập',array('controller'=>'users','action'=>'Login'));
					echo "</li>";
					echo "</ul>";
					
				}
				else
				{
					echo "<ul id=\"onetop\">";
					echo "<li>";
					echo $html->link('Thoát',array('controller'=>'users','action'=>'logout2'),array('onclick'=>'return confirm("Bạn có muốn thoát!")'));					
					echo "</li>";
					echo "<li>";
					echo "&nbsp;&nbsp;";
					echo "|";
					echo "&nbsp;&nbsp;";
					echo "</li>";
					echo "<li>";	
					$user = $this->requestAction(array("controller"=>"users","action"=>"thongtin_user"));
					if($user['User']['role']=="admin") {
						echo $html->link('Trang quản lí  ',array('controller'=>'users','action'=>'quanli_user'));
						echo "</li>";
						echo "<li>";
						echo "&nbsp;&nbsp;";
						echo "|";
						echo "&nbsp;&nbsp;";
						echo "</li>";
						echo "<li>";
						echo $html->link('Trang cá nhân  ',array('controller'=>'users','action'=>'thongtincanhan'));
						echo "</li>";
					}
					else {
						echo $html->link('Trang cá nhân  ',array('controller'=>'users','action'=>'thongtincanhan'));
					}
					echo "</li>";
					echo "<li>";
					echo "&nbsp;&nbsp;";
					echo "|";
					echo "&nbsp;&nbsp;";
					echo "</li>";
					echo "<li>";
					echo 'Welcome:  <b>',$this->Session->read("Username"),'</b><br/>';
					echo "</li>";
					echo "</ul>";
					
					
				}
				?>
				</div>			
		</div>
		<div id="banner">
		<div id="trong"></div>
		<div id="nav">
			<div id="navigation">
					<?php echo $this->element('menu'); ?>
			</div>
			<div id="search">
				<form action="/raovat_ttcn/posts/search" method="post">
					<input id="searchtext" type="text" name="data[Post][tieude]" size="50" />
				</form>	
						
			</div>
		</div>
	</div> <!-- end header -->